package com.atguigu.lease.app.controller;

import com.atguigu.lease.app.service.PaymentTypeService;
import com.atguigu.lease.model.bean.PaymentType;
import com.atguigu.lease.model.result.Response;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.websocket.OnOpen;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "支付方式模块")
@RestController
@RequestMapping("/app/payment")
public class PaymentInfoController {
    @Autowired
    PaymentTypeService paymentTypeService;
    @Operation(summary = "1、查询所有支付方式")
    @GetMapping("/list")
    public Response<List<PaymentType>> list(){
        return Response.ok(paymentTypeService.list());
    }
}
